<template>
	<view class="applyFor-success">
		<static-image src="../static/img/applyFor/success.png" width="192" height="192" :align-center="true"></static-image>
		<view class="text-c mar-t-10">
			<view class="font-s-18 fw-b">提交成功</view>
			<view class="color-999 mar-t-15">平台已收到您的申请，请耐心等待审核</view>
		</view>
		<view class="handle-btn">
			<view class="">
				<u-button @click="toHome()" shape="circle" type="primary" hover-class="none" :custom-style="{background:'#F5F7FA',color:'#1F1F1F',width:'288rpx',fontWeight:'bold'}">回到首页</u-button>
			</view>
			<view class="">
				<u-button @click="toDetail()" shape="circle" type="primary" :custom-style="{background:'linear-gradient(180deg, #4790FF 0%, #297EFF 100%)',width:'288rpx',fontWeight:'bold'}">查看详情</u-button>
			</view>
		</view>
		<view class="form-detail-box">
			<view class="form-detail-item">
				<view class="label-text">真实姓名：</view>
				<view class="value-text">{{info.name || '-'}}</view>
			</view>
			<view class="form-detail-item">
				<view class="label-text">手机号码：</view>
				<view class="value-text">{{info.phone || '-'}}</view>
			</view>
			<view class="form-detail-item">
				<view class="label-text">申请金额：</view>
				<view class="value-text">{{info.applyAmount || '-'}}</view>
			</view>
			<view class="form-detail-item">
				<view class="label-text">申请时间：</view>
				<view class="value-text">{{info.applyTime || '-'}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
					expand:{}
				}
			}
		},
		onLoad(e) {
			this.getDetail(e.orderId)
		},
		methods: {
			getDetail(id){
				uni.showLoading({ mask: true })
				this.$request({
					url: '/orderInfo/getDetail',
					method: 'get',
					data: { id: id }
				}).then(response => {
					this.info = response.data
				})
			},
			toHome(){
				uni.switchTab({
					url:'/pages/index/index'
				})
			},
			toDetail(){
				uni.redirectTo({
					url:'/pagesA/order/detail?orderId='+this.info.id
				})
			}
		}
	}
</script>
<style>
	page {
		background: #fff;
	}
</style>
<style lang="scss" scoped>
	.applyFor-success {
		padding: 80rpx 32rpx;
		.handle-btn{
			display: flex;
			justify-content: center;
			margin-top: 48rpx;
			>view{
				margin: 0 24rpx;
			}
		}
		.form-detail-box{
			margin-top: 88rpx;
			font-size: 32rpx;
			.form-detail-item{
				margin-bottom: 48rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				.value-text{
					text-align: right;
					font-weight: bold;
				}
			}
		}
	}
</style>
